package cn.wolfcode.business.controller;


import cn.wolfcode.business.service.IReportService;
import cn.wolfcode.business.vo.ConsumerReportVO;
import cn.wolfcode.business.vo.ConsumerStatisVo;
import cn.wolfcode.common.core.controller.BaseController;
import cn.wolfcode.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/business/report")
public class ReportController extends BaseController {

    @Autowired
    private IReportService reportService;

    @GetMapping("/consumer")
    public TableDataInfo consumerReport(ConsumerStatisVo vo){

        startPage();
        List<ConsumerReportVO> list = reportService.queryConsumerReport(vo);
        return getDataTable(list);
    }
}
